public class Teacher extends Person implements Display{
    private String id;
    private String prof;

    public Teacher(String name, Integer age, String sex) {
        super(name, age, sex);
        id = "1";
        prof = "教数学的";
    }

    public void teach(){
        System.out.println(id+prof+"在教书");
    }

    @Override
    public void showInfo() {
        teach();
    }
}
